package com.fintech.third.utils;

import java.util.Date;
import java.util.Map;

import com.fintech.third.dao.MoxieTaskInfoMapper;
import com.fintech.third.model.MoxieTaskInfo;
import com.fintech.third.service.moxie.MoXieService;
import com.marvels.common.utils.MarvelsLogUtil;

public class MoxieFundThread implements Runnable{
	
	private Map<String, String> map;

	private MoXieService MoXie = (MoXieService) ApplicationContextGet.getApplicationContext().getBean("freshMoXie");

//	private loanInfoIDragonService loanInfoIDragonService = (loanInfoIDragonService) ApplicationContextGet.getApplicationContext()
//			.getBean("loanInfoIDragonService");

	public Map<String, String> getMap() {
		return map;
	}

	public void setMap(Map<String, String> map) {
		this.map = map;
	}

	@Override
	public void run() {
		MoxieTaskInfoMapper moxieTaskInfoMapper=(MoxieTaskInfoMapper)ApplicationContextGet.getApplicationContext().getBean("moxieTaskInfoMapper");
		String taskId=map.get("taskId");
		String loanId=map.get("loanId");
		MarvelsLogUtil.getInstance().info("==================添加公积金任务信息开始,loanId" + loanId + ",任务taskId" + taskId);
		MoxieTaskInfo moxieTaskInfo=new MoxieTaskInfo();
		moxieTaskInfo.setCreatedBy("sys");
		moxieTaskInfo.setCreatedDate(new Date());
		moxieTaskInfo.setLoanId(loanId);
		moxieTaskInfo.setTaskId(taskId);
		moxieTaskInfo.setType("2");
		moxieTaskInfo.setResult("0");
		moxieTaskInfoMapper.insertMoxieTaskInfo(moxieTaskInfo);
		MarvelsLogUtil.getInstance().info("==================添加公积金任务信息结束,loanId" + loanId + ",任务taskId" + taskId+",开始修改公积金认证状态");
//		AcLoanApplyInfo loan = new AcLoanApplyInfo();
//		loan.setLoanId(loanId);
//		loan.setOperatorDataCollectResult("1");
//		loanInfoIDragonService.input(loan);
	}
}
